<html>
<!--
Copyright (c) 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<head>
<title>PNaCl Debug URL test</title>
<script type="text/javascript" src="load_util.js"></script>
<script type="text/javascript" src="nacltest.js"></script>
</head>
<body>
<h2>PNaCl Debug URL Test</h2>
</body>
<script>

function create(nmf_url) {
  var embed = document.createElement("embed");
  embed.src = nmf_url;
  embed.type = "application/x-pnacl";
  embed.addEventListener("load", function(evt) {
    load_util.shutdown("1 test passed.", true);
    // Remove the embed so that the debugger will shut down.
    embed.parentNode.removeChild(embed);
  }, true);
  embed.addEventListener("error", function(evt) {
    load_util.log("Load error: " + embed.lastError);
    load_util.shutdown("1 test failed.", false);
    // Remove the embed so that the debugger will shut down.
    embed.parentNode.removeChild(embed);
  }, true);
  document.body.appendChild(embed);
}

var nmf_file = getTestArguments()['nmf_file'];
create(nmf_file);

</script>
</html>
